public class Paycheck 
{
	public Paycheck(double w,double h)
	{
		wage=w;
		hours=h;
	}
	public Paycheck()
	{
		this(0,0);
	}
	
	
	public double pay()
	{
		return wage*hours+((hours>40)?(hours-40)*0.5*wage:0);
	}
	
	public String toString()
	{
		return "wage = "+wage+", hours worked = "+hours;
	}
	
	private double wage;
	private double hours;
}
